home *** CD-ROM | disk | FTP | other *** search
/ My Neighborhood / My Neighborhood.iso / mac / MacFiles / Zoo5.Dxr / 00037.ls < prev    next >
Encoding:
Text File  |  1997-11-18  |  3.5 KB  |  91 lines

  1. on Seg1
  2.   global LbalanceHList, LbalanceVList, RbalanceHList, RbalanceVList, onScaleList, activeSprite, LcurrentWeight, RcurrentWeight, offRight, tempObject
  3.   setAt(onScaleList, activeSprite - 23, 1)
  4.   set tempWeight to integer(the name of cast the castNum of sprite activeSprite)
  5.   if offRight then
  6.     set RcurrentWeight to RcurrentWeight - tempWeight
  7.     set the castNum of sprite 12 to the number of cast string(RcurrentWeight)
  8.   else
  9.     set LcurrentWeight to LcurrentWeight + tempWeight
  10.     set the castNum of sprite 11 to the number of cast string(LcurrentWeight)
  11.   end if
  12.   set tempR to RcurrentWeight - LcurrentWeight + 5
  13.   if tempR < 1 then
  14.     set tempR to 1
  15.   end if
  16.   if tempR > 9 then
  17.     set tempR to 9
  18.   end if
  19.   set holdOld to the castNum of sprite 6
  20.   set the castNum of sprite 6 to the number of cast "place holder" + tempR
  21.   set the locH of sprite 11 to getAt(LbalanceHList, tempR)
  22.   set the locV of sprite 11 to getAt(LbalanceVList, tempR)
  23.   set the locH of sprite 12 to getAt(RbalanceHList, tempR)
  24.   set the locV of sprite 12 to getAt(RbalanceVList, tempR)
  25.   set holdOld to the castNum of sprite 6 - holdOld
  26.   set holdOld to abs(holdOld)
  27.   repeat with T = 24 to 28
  28.     repeat with r = 1 to holdOld
  29.       if getAt(onScaleList, T - 23) = 1 then
  30.         if the locH of sprite T > 172 then
  31.           set the locV of sprite T to the locV of sprite T - 6
  32.           next repeat
  33.         end if
  34.         set the locV of sprite T to the locV of sprite T + 6
  35.       end if
  36.     end repeat
  37.   end repeat
  38.   repeat with r = 1 to holdOld
  39.     if the locH of sprite tempObject > 172 then
  40.       set the locV of sprite tempObject to the locV of sprite tempObject - 6
  41.       next repeat
  42.     end if
  43.     set the locV of sprite tempObject to the locV of sprite tempObject + 6
  44.   end repeat
  45. end
  46.  
  47. on Seg2
  48.   global LbalanceHList, LbalanceVList, RbalanceHList, RbalanceVList, onScaleList, activeSprite, LcurrentWeight, RcurrentWeight, offLeft, tempObject
  49.   setAt(onScaleList, activeSprite - 23, 1)
  50.   set tempWeight to integer(the name of cast the castNum of sprite activeSprite)
  51.   if offLeft then
  52.     set LcurrentWeight to LcurrentWeight - tempWeight
  53.     set the castNum of sprite 11 to the number of cast string(LcurrentWeight)
  54.   else
  55.     set RcurrentWeight to RcurrentWeight + tempWeight
  56.     set the castNum of sprite 12 to the number of cast string(RcurrentWeight)
  57.   end if
  58.   set tempR to RcurrentWeight - LcurrentWeight + 5
  59.   if tempR > 9 then
  60.     set tempR to 9
  61.   end if
  62.   if tempR < 1 then
  63.     set tempR to 1
  64.   end if
  65.   set holdOld to the castNum of sprite 6
  66.   set the castNum of sprite 6 to the number of cast "place holder" + tempR
  67.   set the locH of sprite 11 to getAt(LbalanceHList, tempR)
  68.   set the locV of sprite 11 to getAt(LbalanceVList, tempR)
  69.   set the locH of sprite 12 to getAt(RbalanceHList, tempR)
  70.   set the locV of sprite 12 to getAt(RbalanceVList, tempR)
  71.   set holdOld to the castNum of sprite 6 - holdOld
  72.   repeat with T = 24 to 28
  73.     repeat with r = 1 to holdOld
  74.       if getAt(onScaleList, T - 23) = 1 then
  75.         if the locH of sprite T < 172 then
  76.           set the locV of sprite T to the locV of sprite T - 6
  77.           next repeat
  78.         end if
  79.         set the locV of sprite T to the locV of sprite T + 6
  80.       end if
  81.     end repeat
  82.   end repeat
  83.   repeat with r = 1 to holdOld
  84.     if the locH of sprite tempObject < 172 then
  85.       set the locV of sprite tempObject to the locV of sprite tempObject - 6
  86.       next repeat
  87.     end if
  88.     set the locV of sprite tempObject to the locV of sprite tempObject + 6
  89.   end repeat
  90. end
  91.